package calvin.study.springboot.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class LogDao {
	
	@Autowired
	private JdbcTemplate jdbcTemplate;
	
	public void insert(Long bizId,int optType,String json) {
		String sql = "INSERT INTO `t_log`(biz_id,opt_type,snapshot,create_time,update_time) VALUES(?,?,?,NOW(),NOW())";
		jdbcTemplate.update(sql, bizId,optType,json);
	}
	
}
